package lormi.meipin.entity;

import java.io.Serializable;
import java.util.Date;

public class Token implements Serializable{

	private static final long serialVersionUID = 1L;

	private Integer id;

    private Integer userid;

    private String token;

    private Date exittime;

    private Date createtime;

    private Date updatetime;
    
    public Token(Integer userid,String token){
    	this.userid=userid;
    	this.token=token;
    	this.createtime=new Date();
    	this.updatetime=this.createtime;
    	this.exittime=new Date(this.updatetime.getTime()+15*24*3600*1000);
    }
    
    public Token() {
		super();
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token == null ? null : token.trim();
    }

    public Date getExittime() {
        return exittime;
    }

    public void setExittime(Date exittime) {
        this.exittime = exittime;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
}